package com.wqiuqiu.gulimall.product.feign;

import com.wqiuqiu.common.R;
import com.wqiuqiu.common.to.SkuFullReductionTo;
import com.wqiuqiu.common.to.SkuLadderTo;
import com.wqiuqiu.common.to.SkuMemberPriceTo;
import com.wqiuqiu.common.to.SpuBoundTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("gulimall-coupon")
public interface CouponFeignService {

    @PostMapping("/coupon/spubounds/save")
    R saveBound(@RequestBody SpuBoundTo spuBoundTo);
    @PostMapping("/coupon/skuladder/savebatch")
    R saveLadder(@RequestBody List<SkuLadderTo> skuLadderTos);
    @PostMapping("/coupon/skufullreduction/savebatch")
    R saveFullReduction(@RequestBody List<SkuFullReductionTo> skuFullReductionTos);
    @PostMapping("/coupon/memberprice/savebatch")
    R saveMemberPrice(@RequestBody List<SkuMemberPriceTo> skuMemberPriceTos);
}
